package com.mxpio.erp.common.plan.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.jpa.model.BizOrderLine;
import com.mxpio.erp.common.technology.vo.ItemWithSubExtendsVO;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @Author : 吴盼盼
 * @Datetime : 2022/12/10 10:36
 * @Desc :  组织需求 明细
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PLAN_OD_LINE")
@Schema(description="组织需求明细行")
public class OrganizationDemandLine extends BizOrderLine {

    private static final long serialVersionUID = 1L;

    @Column(name = "DEMAND_DATE_")
    @Schema(description = "需求日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date demandDate;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;
    @Transient
    private OrganizationDemand organizationDemand;
    @Transient
    private ItemWithSubExtendsVO item;//物料相关信息

    @Column(name = "MATERIAL_BRAND_")
    @Schema(description = "材料牌号")
    private String materialBrand;

    @Column(name = "MATERIAL_TYPE_")
    @Schema(description = "材料类型")
    @Dict(dicCode = "ERP_TECH_MATERIAL_TYPE")
    private String materialType;
}
